package zhtest;

/**
 * @描述:
 * @Author: zhangh
 * @Time: 2021/3/11 9:28
 **/
public class Testexception {
    public static void main(String[] args) {
        //得到@stop@的索引号
        String suggestAnswer="您的信用卡账单已于3月4号产生，@1008@业务接口调用异常，已为您转接案件菜单！@stop@";
        String keymenu="@1008@";
        String exceptionCode="@stop@";
        int i = suggestAnswer.indexOf(keymenu);
        int j = suggestAnswer.indexOf(exceptionCode);
        //截取@1008@和@stop之间的内容
        String substring = suggestAnswer.substring(i+6, j);
        System.out.println(substring);
    }
}
